<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>知否</title>
	<style>
		*{
			margin: 0;
			padding: 0;
			list-style: none;
			text-decoration: none;
		}
		body{
			background: #3f3f3f;
		}
		

		#top ul li{
			margin: 0 20px 0 20px;
			color: #777777;
		}
		#top ul a:hover{
			color: #ea6f5a;}
		#top input{
			border: 1px solid #3f3f3f;
			width:200px;
			height: 30px;
			border-radius:10px ;
			outline: none;
			padding-left: 17px;
			font-size: 1.1em;
			font-family: verdana;
			background-color: #4f4f4f;
		}
		/*导航条*/
		#top{
			border-bottom: 1px solid gray;
			width:100%;height:30px;position:fixed;top:0;left:0;
			 height:60px;
			z-index: 100;
			background: #3f3f3f;
		
		}
		#top ul li{
			display: inline-block;
		}
		
		#app{
			width: 70%;
			margin: 0 auto;
		}
		#container{
			width: 600px;
			height: 300px;
			position: relative;
			margin-top:-474px ;
			z-index: 0px;
		}
		#container:hover .arrow{
			display: block;
		}
		#num>li{
			width: 20px;
			height: 20px;
			background: pink;
			border-radius: 50%;
			float: left;
			text-align: center;
			line-height: 20px;
			margin: 5px;
		}
		#picture{
			z-index: 99;
			position: absolute;
		}
		#picture li img{
			height: 280px;
			width: 650px;
			border-radius:20px ;
		}
		#picture>li{
			position: absolute;
			display: none;
		}
		.arrow{
			z-index:101;
			width: 20px;
			height: 40px;
			position: absolute;
			background: rgba(0,0,0,0.5);
			top: 45%;
			transform:translate(0,-50%);
			text-align: center;
			line-height: 40px;
			display: none;
		}
		#left{
			left:10px;
		}
		#right{
			right: -40px;
		}
		a{
			text-decoration: none;
			color: white;
		}
		#picture>.active{
			display: block;
		}
		#num>.active{
			background: yellow;
		}


		#zuo{
	width: 69%;
}
#you{
	width: 30%;
	position: relative;
	left: 700px;
	top: 126px;
}
#you ul a li img{
	width: 330px;
	height: 201px;
}
#db{
	height: 150px;
	background: #3f3f3f;
}
#nr{
	width: 650px;
}
#nr  a{
	display: inline-block;
    background: #a5a5a5;
	height: 40px;
	width: 650px;
	border-radius:10px ;
	margin: 10px 0;
	font-size:20px ;
	text-align: center;
	line-height: 40px;
	vertical-align: middle;
}
#nr ul li{
	border-top:1px solid gray ;
	height: 150px;
	border-bottom:1px solid gray ;
	padding:10px 10px ;
}

#tuijian_ul{
			position: relative;
    		top: 20px;
    		width:330px; 
			
		}
		#tuijian a{
			margin-left: 190px;
		}
    #tuijian_ul ul{
    	margin: 0 0 20px;
    text-align: left;
    list-style: none;
    }

    #tuijian_ul ul li .tuijian_a{
			    width: 100%;
    			height: 100%;
    			border-width: 20px;
    			border-bottom: 1px solid #3f3f3f;
    			border-style: solid;
    			border-color: rgb(221, 221, 221);
    			border-image: initial;
    			border-radius: 50%;
		}

		 #tuijian_ul ul li{
		 	margin-top: 20px;
		 	line-height: 50px;
		 }

		  #tuijian_ul .tuijian_ul_a{
		  	position: absolute;
    		padding: 7px 7px 7px 12px;
    		left: 0;
    		width: 100%;
    		font-size: 13px;
   			color: #787878;
    background-color: #f7f7f7;
    		border: 1px solid #dcdcdc;
    		border-radius: 4px;
    		text-align: center;
		  }  
		  #tuijian_ul .tuijian_ul_a{
		  	color: #c8c8c8;
    border-color: #2f2f2f;
    background-color: #4a4a4a;
		  }
	</style>
</head>
<body>
<div id="top">
	<ul>
		<li style="margin:10px 150px 0 20px;font-size: 25px;color: #ea6f5a;" >知否</li>
		<li style="margin-left: 140px;"><a href="#">发现</a></li>
		<li><a href="#">关注</a></li>
		<li><a href="#">消息</a></li>
		<li><a href="#"><input type="text" placeholder="搜&nbsp;索"></a></li>
		<li  style="margin-left: 450px;"><a href="#" >登录</a></li>
		<li><a class="zhuche" href="">注册</a></li>
		<li><a href="#">写文章</a></li>
	</ul>
</div><!-- top -->
<div id="app">
	<div id="you">
		<ul>
		<a href="https://cn.udacity.com/course/business-analyst-nanodegree--nd100-cn-trial?utm_source=youdao-jianshu&utm_medium=display&utm_campaign=band&utm_term=PC-youdao_dand&utm_content=jianshu-band-091102">
			<li><img src="picture/gg.png" alt=""></li>
		</a>	
		</ul>
		<div id="tuijian_ul">
			
		<div id="tuijian">
			<span style="color:#969696;">推荐作者</span>
			<a style="color:#969696;" class="huanyipi" href="">
				<i><img src="picture/tj.png" alt=""></i>
				换一批
			</a>
		</div><!-- 推荐作者 -->
		<ul>
			<li>
				<a class="tuijian_a" href="">
					<img src="" alt="">
				</a>
				<a calss="li_a2" href="">
					<i></i>
				</a>
				<a href="">
					
				</a>
				<p></p>
			</li>
			<li>
				<a class="tuijian_a" href="">
					<img src="" alt="">
				</a>
				<a calss="li_a2" href="">
					<i></i>
				</a>
				<a href="">
					
				</a>
				<p></p>
			</li>
			<li>
				<a class="tuijian_a" href="">
					<img src="" alt="">
				</a>
				<a calss="li_a2" href="">
					<i></i>
				</a>
				<a href="">
					
				</a>
				<p></p>
			</li>
			<li>
				<a class="tuijian_a" href="">
					<img src="" alt="">
				</a>
				<a calss="li_a2" href="">
					<i></i>
				</a>
				<a href="">
					
				</a>
				<p></p>
			</li>
			<li>
				<a class="tuijian_a" href="">
					<img src="" alt="">
				</a>
				<a calss="li_a2" href="">
					<i></i>
				</a>
				<a href="">
					
				</a>
				<p></p>
			</li>
		</ul>
		<a class="tuijian_ul_a" href="">
			查看全部
			<i>></i>
		</a>
		</div><!-- tuijian_ul -->
	</div><!--右小块-->
	<div id="zuo">
		<!--轮播图-->
		<div id="container">
			<ul id="num" style="display: none">
				<li class="active">1</li>
				<li>2</li>
				<li>3</li>
				<li>4</li>
				<li>5</li>
			</ul>
			<ul id="picture">
				<li class="active"><img src="picture/11.png" alt=""></li>
				<li><img src="picture/55.png" alt=""></li>
				<li><img src="picture/44.png" alt=""></li>
				<li><img src="picture/22.png" alt=""></li>
				<li><img src="picture/33.png" alt=""></li>
			</ul>
			<div id="left" class="arrow">
				<a href="javascript:left()"><</a>
			</div>
			<div id="right" class="arrow">
				<a href="javascript:right()">></a>
			</div>
		</div> <!--轮播图-->
<!--内容-->
		<div id="nr">
			<ul>
				<li>
					123
				</li>
				<li>
					123
				</li>
				<li>
					123
				</li>
				<li>
					123
				</li>
				<a href="#">阅&nbsp;&nbsp;读&nbsp;&nbsp;更&nbsp;&nbsp;多</a>

			</ul>
		</div>
	</div>  <!--左大块-->
</div>
<!--底部-->
<div id="db">

</div>
</body>
<!--轮播图-->
<script>
    var num=document.getElementById('num');
    var pic=document.getElementById('picture');
    var con=document.getElementById('container');

    var nums=num.getElementsByTagName('li');
    var pics=picture.getElementsByTagName('li');

    var index=0;

    function toNum(num) {
        //把所有的li的active样式去掉

        //让第num个li拥有active样式
        for(var i in nums){
            nums[i].className='';
            pics[i].className='';
        }
        nums[num].className='active';
        pics[num].className='active';
    }
    toNum(0);

    Array.from(nums).forEach((item,index) =>{
        item.onclick = e =>toNum(index);
    })

    function left(){
        index = Math.abs(index-1+5) % 5;
        toNum(index);
    }
    function right(){
        index = Math.abs(index+1) % 5;
        toNum(index);
    }

    var flag=setInterval(right,1500);

    container.onmouseenter = function(){
        clearInterval(flag);

    }
    container.onmouseleave = function(){
        flag = setInterval(right,1500);

    }
</script>
</html>